﻿using System;
using System.Collections.Generic;

using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class admin_AccountReportClient : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack){
            REPORTDS ds = (REPORTDS)Session["reportAccDs"];
            Session["reportAccDs"] = null;
            if (ds != null)
            {
                CrystalDecisions.CrystalReports.Engine.ReportDocument rpt = new CrystalDecisions.CrystalReports.Engine.ReportDocument();

                rpt.Load(Server.MapPath("~/Reports/AccountReportClient.rpt"));

                rpt.SetDataSource(ds);

                CrystalReportViewer1.ReportSource = rpt;
                CrystalReportViewer1.DataBind();
                Session["reportACC"] = rpt;
            }
        
        }else{

            if (Session["reportACC"] != null) { CrystalReportViewer1.ReportSource = Session["reportACC"]; }
        }
    }
}